add_library(
    dyn_services_main_obj OBJECT
    src/dyn_services_core.c
    src/dyn_services_card_channel.c
    src/dyn_services_card_channel_inner.c
    src/dyn_services_card_channel_scp.c
    src/dyn_services_log.c
    src/dyn_services_binding_key.c
    src/dyn_services_main.c
)

target_include_directories(dyn_services_main_obj PUBLIC inc)
target_include_directories(dyn_services_main_obj PRIVATE src)
target_include_directories(dyn_services_main_obj PRIVATE ${SE_BASE_SERVICES_DEFAULT_INC})
target_compile_options(dyn_services_main_obj PRIVATE ${SE_BASE_SERVICES_DEFAULT_CC})
target_link_libraries(dyn_services_main_obj PRIVATE se_apdu_core_obj)
target_link_libraries(dyn_services_main_obj PRIVATE se_base_services_fwk_obj)
target_link_libraries(dyn_services_main_obj PRIVATE logger_obj)
target_link_libraries(dyn_services_main_obj PRIVATE se_base_services_defines)

if(OPTION_SECUREC_INDEPENDENT)
    message(STATUS "dyn_services_main_obj use independent secure c.")
    target_link_libraries(dyn_services_main_obj PRIVATE securec_interface)
endif()

if(ENABLE_TESTING)
    target_include_directories(dyn_services_main_obj PUBLIC src)
endif()
